<%@page pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        添加编辑修改信息
    </title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>
</head>
<body>
<div class="x-body">
    <form class="layui-form layui-form-pane" action="${pageContext.request.contextPath}/housing/edit" id="add">
        <input type="text" name="id" value="${housing.id}" hidden>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>所属小区
            </label>
            <div class="layui-input-block">
                <select name="comName" id="community_id">
                    <option >---请选择小区---</option>
                    <c:forEach items="${villages}" var="village">
                        <option value="${village.id}"> ${village.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>栋数
            </label>
            <div class="layui-input-block">
                <select name="buildName" id="building_id">
                    <option >---请选择栋数---</option>
                    <c:forEach items="${buildings}" var="building">
                        <option value="${building.id}"> ${building.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>房产编码
            </label>
            <div class="layui-input-block">
                <input type="text" name="houseId" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${housing.houseId}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>房产名称
            </label>
            <div class="layui-input-block">
                <input type="text" name="property" autocomplete="off" placeholder="空制在80个汉字，160个字符以内"
                       class="layui-input" value="${housing.property}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>户主姓名
            </label>
            <div class="layui-input-block">
                <select name="perName" id="name">
                    <option >---请选择户主---</option>
                    <c:forEach items="${persons}" var="persons">
                        <option value="${persons.name}"> ${persons.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>联系方式
            </label>
            <div class="layui-input-block">
                <input type="text" name="contactWay" autocomplete="off" placeholder=""
                       class="layui-input" lay-verify="required|phone" value="${housing.contactWay}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>房间数
            </label>
            <div class="layui-input-block">
                <input type="text" name="roomNumber" autocomplete="off" placeholder=""
                       class="layui-input" lay-verify="required|number" value="${housing.roomNumber}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>单元
            </label>
            <div class="layui-input-block">
                <input type="text" name="unit" autocomplete="off" placeholder="请输入数字"
                       class="layui-input" lay-verify="required|number" value="${housing.unit}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='x-red'>*</span>楼层
            </label>
            <div class="layui-input-block">
                <input type="text" name="floor" autocomplete="off" placeholder="请输入数字"
                       class="layui-input" lay-verify="required|number" value="${housing.floor}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class='fa fa-calendar'>*</span>修改日期
            </label>
            <div class="layui-input-inline">
                <input type="datetime-local" class="layui-input" name="checkIn" placeholder="出生日期" id="LAY_demorange_s" value="" >
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">
                <span class='x-red'>*</span>描述
            </label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="describes" class="layui-textarea" ></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <button class="layui-btn" type="submit" lay-filter="add" lay-submit="">
                保存
            </button>
        </div>
        <!--</form>-->
        <div style="height:100px;"></div>

    </form>
</div>
<script src="lib/layui/layui.js" charset="utf-8"></script>
<script src="js/x-layui.js" charset="utf-8"></script>
<script src="js/jquery.min.js" charset="utf-8"></script>
<!--<script src="/static/xiyuan/js/jquery.js" charset="utf-8"></script>-->
<script>

    layui.use(['laydate','element','layer','form'], function(){
        $ = layui.jquery;//jquery

        laydate = layui.laydate;//日期插件
        lement = layui.element();//面包导航
        layer = layui.layer;//弹出层

        form = layui.form();
        form.render();
    })
</script>
</body>
</html>